linux 下 编译:
export GOPATH=/data/myproject
export GOPATH=/data/myproject/src/xlog:$GOPATH
export TAG=`date +%Y-%m-%dT%H:%M:%S`
export Version=`go version`
export KernelVer=`uname -r`
#go build -ldflags "-s -w -X common.VERSION=$TAG" xlog.3.3.go

#go build -ldflags "-s -w -X 'common.BuildTime=$TAG' -X 'common.GoVersion=$Version'" xlog.3.3.go
go build -ldflags "-s -w -X 'common.BuildTime=$TAG' -X 'common.GoVersion=$Version' -X 'common.KernelVer=$KernelVer'" xlog.3.3.go

windows 下编译成Linux可执行文件：
go env -w GOOS=linux
go env -w GOARCH=amd64
go build -ldflags "-s -w -X 'main.BuildTime=2024-11-20T11:25:47' -X 'main.GoVersion=go version go1.20.2 windows/amd64'" xlog.go
